This repository was archived by the owner on Jul 24, 2026. It is now read-only.
convoy: NetworkConfig.env — a network-wide agent env map in convoy.toml - #104
Merged
Conversation
Adds an `env` field to <net>/convoy.toml: a string->string map merged into EVERY agent's derived pty.toml session env at render — BOTH the harness and the ding session — UNDER the derived wiring (ST_AGENT/ST_ROOT/PTY_ROOT always win, so a network key can't repoint the agent at another bus). A per-agent `env` still overrides a network default. Unset -> no network env. This is the fleet-wide runtime-knob seam: e.g. PTY_REAP_ON_EXIT=false to preserve finished sessions network-wide (the pty daemon reads it from its OWN env, so it must go on both sessions). Pairs with the ding selector (#99) so ONE re-render bakes both ding=rust and PTY_REAP_ON_EXIT=false. - network-config.ts: env field + isEnvMap validation (a non-string-map is dropped whole, never a half-valid launch env), read + write. - launch.ts: precedence networkEnv < spec.env < derived wiring, on both sessions. - +2 tests: round-trip/validation; both-sessions + derived-wins + per-agent-override. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MCzqQKSpPiNX2ketyubByS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a network-wide agent env map — an
envfield in<net>/convoy.toml— merged into every agent's derivedpty.tomlsession env at render (both the harness and the ding session).This is the general primitive cos asked for: the fleet-wide runtime-knob seam. Its first use is the ding cutover — one re-render bakes both
ding=rust(via #99) andPTY_REAP_ON_EXIT=false(preserve finished sessions network-wide; the pty daemon reads it from its own env, so it must land on both sessions).Precedence (safety)
networkEnv < spec.env < derived wiring:ST_AGENT/ST_ROOT/PTY_ROOTare correct-by-construction, so a network (or per-agent) key can never repoint an agent at another bus;envoverrides a network default (network is the fleet baseline).Details
network-config.ts—env?: Record<string,string>onNetworkConfig, withisEnvMapvalidation: a non-string-map (e.g. a numeric value or nested table) is dropped whole, never surfaced as a half-valid launch env; read + write.launch.ts—writePtyTomlreads the network config once (ding + env), mergesnetworkEnvunder the derived wiring on the harness session and on the ding session ({ ...networkEnv, ...env }).Tests
+2 (535 total pass, typecheck clean): network-config round-trip + invalid-map-dropped;
writePtyTomlputs the knob on both sessions, the derived wiring wins over a hijack attempt, and a per-agent key overrides the network default.Set via a hand-edit /
writeNetworkConfig(the net config is the human-readable source of truth) — no CLI setter in this PR. Next: the staged hetz ding cutover uses it (ding=rust+env.PTY_REAP_ON_EXIT=false), canary agent first, myself last.🤖 Generated with Claude Code
https://claude.ai/code/session_01MCzqQKSpPiNX2ketyubByS